package operation;

import booklist.BookList;
import book.Book;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-10
 * Time: 15:51
 */
public class ShowOperation implements Operation {
    @Override
    public void work(BookList booklist) {
        System.out.println("显示书籍：");
        //获取书架中当前书籍的数量
        int cursize = booklist.getBooksize();
        for (int i = 0; i < cursize; i++) {
            Book book = booklist.getpos(i);
            System.out.println(book);
        }
    }
}
